package demo;

import common.exception.transaction.BeanFactory;
import dao.ICustomerDao;
import dao.IWorkDao;
import dao.imp.CustomerDaoImp;
import dao.imp.WorkDaoImp;
import pojo.Work;

import static common.exception.transaction.BeanFactory.getPojo;

public class test {
    public static void main(String[] args) {
//        ICustomerDao dao = (ICustomerDao) BeanFactory
//                .getPojo("customerDao");
//      /*  int i = dao.myflag_one();//使得它的值为1；
//        System.out.println(i);*/
//        dao.myflag_one();
//        int value = dao.query_myflag();
//        System.out.println(value);
        ICustomerDao dao = (ICustomerDao) getPojo("customerDao");
        IWorkDao workdao = (IWorkDao) getPojo(BeanFactory.WORKDAO);
//        ICustomerDao dao1 = new CustomerDaoImp();
//        IWorkDao workdao1 = new WorkDaoImp();
//        Work work = new Work(1, 1, 1);
//        workdao.saveWork(work);
        assert workdao != null;
        System.out.println(workdao.toString());
        System.out.println(dao);
        System.out.println(workdao);
    }
}
